#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtMqtt/qmqttclient.h>
#include <QDebug>
#include <QString>
#include <QByteArray>
#include <QTextToSpeech>    //说话的类；需要在pro加入语言转换类：texttospeech

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT    

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void subfound();
    void foundctrl();
    void subtemp();
    void tempctrl();
    void subhumi();
    void humictrl();
    void subflame();
    void flamectrl();
    void subtoxi();
    void toxictrl();
    void statectrl();
    void substate();
    void connectctrl();
    void subconnect();



private slots:
    void on_quit_clicked();

private:
    Ui::MainWindow *ui;
    QMqttClient *found_client = NULL;
    QMqttClient *temp_client = NULL;
    QMqttClient *humi_client = NULL;
    QMqttClient *flame_client = NULL;
    QMqttClient *toxi_client = NULL;
    QMqttClient *state_client = NULL;
    QMqttClient *ctrl_client  = NULL;
    QMqttClient *connect_client  = NULL;
    QTextToSpeech *speak;   //说话的类
};
#endif // MAINWINDOW_H
